package com.zetyun.tiger.connector.manage;

import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.zetyun.rt.meta.jsonschema.annotation.JsonSchemaTitle;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.flink.streaming.connectors.redis.common.mapper.RedisCommand;

import java.util.Set;

@Getter
@Setter
@ToString
@JsonClassDescription("Redis 客户经理客户账号关系")
public class ManageCustAcctParameter {

    @JsonSchemaTitle("master名称")
    @JsonProperty(defaultValue = "redis-master")
    private String masterName;

    @JsonSchemaTitle("sentinel地址")
    @JsonProperty(defaultValue = "rdx1:26379")
    private Set<String> sentinels;


    @JsonSchemaTitle("密码")
    @JsonProperty(defaultValue = "Redis6379")
    private String password;

    @JsonSchemaTitle("数据库")
    @JsonProperty(defaultValue = "5")
    private Integer database;

    @JsonSchemaTitle("redis命令(默认为hset)")
    private RedisCommand rc = RedisCommand.HSET;


    @JsonSchemaTitle("缓存集合名称前缀")
    @JsonProperty(defaultValue = "DIM:HIS:MANA:")
    private String additionalKey;

    @JsonSchemaTitle("客户经理号")
    @JsonProperty(required = true)
    private String manaNoField;

    @JsonSchemaTitle("客户号")
    @JsonProperty(required = true)
    private String custNoField;

    @JsonSchemaTitle("账号")
    @JsonProperty(required = true)
    @JsonPropertyDescription("账号字段")
    private String acctNoField;
}
